<style>
/* 我的小店 */
.myshop-header {border-radius:0.5rem;background:#fff;padding:0.5rem 0.8rem}
.myshop-header .shoplogo {height: 3.5rem; width: 3.5rem; background: #fff; position: absolute; top: 3.5rem; right: 0.8rem; border: 1px solid #eee;border-radius: .2rem}
.myshop-header .shoplogo img {height: 100%; width: 100%; display: block;border-radius: .2rem}
.myshop-header .menus {height: auto; background: #fff;}
.myshop-header .menus .nav {height: auto; width: 1%; padding: 0.5rem 0; margin: 0; font-size: 0.7rem; color: #636363; text-align: center; display: table-cell;position: relative;}
.myshop-header .menus .nav:after  {font-size: 0.7rem;position: absolute;content: '';left:0;top:0.5rem;bottom:0.5rem;border-left:1px solid #d9d9d9;}
 
    .btn.btn-default-o{
        border-radius: 0.6rem;
        line-height: 0.3rem;
        height: 0.8rem;
        padding: 0 0.3rem;
        font-size: .5rem;
    }
    .towline{
        color: #000;
        font-size: 0.7rem;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        white-space: normal;
    }
    .fui-list-inner .text{
        display: -webkit-box;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;
        font-size: .7rem;
        color: #000;
    }
    .goods-selected .fui-list-inner{
        height: 4rem;
        display: -webkit-box;
        display: -webkit-flex;
        display: flex;
        flex-direction: column;
        -webkit-flex-direction: column;
        justify-content: space-between;
        -webkit-justify-content: space-between;
    }
.fe-floatright-bottom a {
    display: block;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 100%;
    background-color: #ff9999;
    color: #fff;
    line-height: 0.7rem;
	font-size:0.45rem;
    margin: 0.5rem auto;
    margin-right: 0;
}
.fe-floatright-bottom a .icon {
    color: #fff;
    font-size: 0.6rem;
    height: 0.6rem;
	line-height: 1rem;
    opacity: 1;
}
.fui-searchbar:after {
	height: 0;
}
.showcode {z-index:118;position:fixed;bottom:3.5rem;right:0;padding:0.15rem 0.3rem;font-size:0.6rem;color:#fff;background-color:{{main.syscolor || '#ff5555'}};border-top-left-radius:1rem;border-bottom-left-radius:1rem;}
</style>
<div class='fui-page fui-page-current page-commission-myshop'>
    <div class='fui-content'>
	<div class="showcode r-f" ng-click="access_json('jy_merch/inpay//merchid='+pagedata.myshop.id);">在线付款 <i class="icon icon-weixin" style="color:#fff;font-size: 0.6rem;"></i></div>	
	<div style="background:{{main.syscolor || '#ff5555'}};;padding:0.5rem;margin-top:0;padding-bottom:1.6rem;">
			<div class="fui-cellone" style="padding:0">
				<div class="fui-cellone-label" style="width:auto;">
					<img style="border-radius: 0.2rem;width:3rem;height:3rem" ng-src="{{tomedia(pagedata.myshop.logo) || '../core/resource/images/gw-user.png'}}" />
				</div>
				<div class="fui-cellone-text" style="color:#fff;padding-left:0.5rem">
					<div class="bold" style="font-size:0.8rem;">{{pagedata.myshop.merchname || '小店名称'}} </div>
					<div class="subtitle" style="font-size:0.6rem;color:#ddd">
						<span class="text">地址：{{pagedata.myshop.address || '暂无店铺地址'}}</span>
						<span ng-if="pagedata.myshop.out_juli>=pagedata.myshop.juli" class="store-distance">{{pagedata.myshop.juli || 0}}km | 约{{pagedata.myshop.peisongtime || 50}}分钟</span>
						<span ng-if="pagedata.myshop.out_juli<pagedata.myshop.juli" class="store-distance"><span class="yellow">超出</span>配送范围({{pagedata.myshop.out_juli}}km)</span></span>
					</div>
					<div ng-if="pagedata.table && pagedata.table.title" style="line-height:1rem;font-size:0.8rem;color:#fff">当前桌号：{{pagedata.table.title}}</div>
				</div>
				<div class="fui-cellone-remark noremark" style="font-size:0.7rem;color:#fff;">
					<a ng-click="access_json('jy_merch/merch//id='+pagedata.myshop.id)" style="border-radius: 1rem;padding:0.2rem 0.3rem;font-size:0.6rem; background-color: #fff;width:auto;color:{{main.syscolor || '#ff5555'}}"><i class="icon icon-qiehuan" style="font-size:0.6rem"></i> 返回商户</a>
				</div>
			</div>		
			<div class="fui-icon-group noborder  col-3" style="padding-top:0.5rem">
					<div class="fui-icon-col-sm external" style="margin:0">
													<div>
														<div class="subtitle" style="font-size:12px;color:#fff">小店商品</div>
														<div class="text bold" style="color:#fff;line-height:1.6rem;font-size:1rem">{{pagedata.myshop.goodscount || '0'}}</div>
													</div>
					</div>
					<div class="fui-icon-col-sm external" style="margin:0">
													<div>
														<div class="subtitle" style="font-size:12px;color:#fff">小店销量</div>
														<div class="text bold" style="color:#fff;line-height:1.6rem;font-size:1rem">{{pagedata.myshop.ordercount || 0}}</div>
														
													</div>
					</div>
					<div class="fui-icon-col-sm external" style="margin:0">
													<div>
														<div class="subtitle" style="font-size:12px;color:#fff">小店评价</div>
														<div class="text bold" style="color:#fff;line-height:1.6rem;font-size:1rem">{{pagedata.myshop.commentsnum || 0}}</div>
													</div>
					</div>
			</div>			
	</div>
	<div style="padding:0.5rem;margin-top:-2rem">
		<div class="myshop-header" style="padding-top:0.2rem">
					<div ng-if="pagedata.myshop.tags" class="subtitle" style="font-size:0.55rem">
								<div class="jylabel jylabel-red" style="">{{pagedata.myshop.tags}}</div>
					</div>
					<div ng-if="pagedata.myshop.coupons.length>0" style="padding:0.3rem 0" ng-click="access_json('jy_weishop/coupon.index//merchid='+pagedata.myshop.id)">
						<div style="overflow-x:scroll;white-space:nowrap">
							<div ng-repeat="c in pagedata.myshop.coupons" class="jylabel jylabel-red" style="background-color:#fff;color:red;border: 1px solid red;margin:0.2rem">{{c.title}}</div>
						</div>
					</div>
					<div ng-if="pagedata.myshop.remark" class="line-notice" style="font-size:0.7rem">
						<div class="line-notice-label"><i class="icon icon-seeraudio"></i></div>
						<div class="line-notice-animation" style="display: flex;">
							<div class="line-animation">{{pagedata.myshop.remark}}</div>
						</div>
					</div>
					<div class="menus">
					<div ng-click="post({merchid:pagedata.myshop.id},'jy_merch/myshop/like/')" class="nav btn-favorite">
						<span>{{pagedata.myshop.islike?'已收藏':'收藏本店'}}</span>
						<span><i ng-class="{'icon icon-xiai':pagedata.myshop.islike,'icon icon-pinpai':!pagedata.myshop.islike}"></i></span>
					</div>
					<a ng-if="pagedata.myshop.iskefu!=1" href="tel:{{pagedata.myshop.tel || pagedata.myshop.mobile}}" class="nav btn-favorite">
						<span>联系客服</span>
						<span><i  class="icon icon-phone"></i></span>
					</a>
					<div ng-if="pagedata.myshop.iskefu==1" ng-click="pagedata.tokefu()" class="nav btn-favorite">
						<span>联系客服</span>
						<span><i class="icon icon-kefu"></i></span>
					</div>
					<div class="nav btn-qrcode"  ng-click="access_json('jy_merch/qrcode//id='+pagedata.myshop.id)">
						<span>二维码</span>
						<span><i class="icon icon-qrcode"></i></span>
					</div>
					</div>
			<div class="fui-list-group" style="margin-top:0;padding:0">
				<ul class="fui-list c" style="font-size:0.65rem;padding:0">
					<li ng-click="pagedata.getlist(0);" ng-class="{'fui-list-inner':1, 'bold':pagedata.params.type==0}"><span>销量榜</span><i class="icon icon-moreunfold"></i></li>
					<li ng-click="pagedata.getlist(1);" ng-class="{'fui-list-inner':1, 'bold':pagedata.params.type==1}"><span>推荐榜 </span><i class="icon icon-moreunfold"></i></li>
					<li ng-click="pagedata.getlist(2);" ng-class="{'fui-list-inner':1, 'bold':pagedata.params.type==2}"><span>热门榜 </span><i class="icon icon-moreunfold"></i></li>
					<li ng-click="pagedata.getlist(3);" ng-class="{'fui-list-inner':1, 'bold':pagedata.params.type==3}"><span>商品分类</span><i class="icon icon-moreunfold"></i></li>
				</ul>
			</div>
			<div class="fui-fullHigh-group" ng-if="pagedata.params.type==3 && pagedata.showgroup">
						<div class="fui-fullHigh-item container" style="position: relative;padding:0 0.5rem">
							<div id="container">
							<div class="fui-icon-group selecter">
								<div class="fui-icon-col" ng-repeat="child in pagedata.category" ng-click="pagedata.params.pcate=child.id;pagedata.getlist();">
								<a ng-class="{'jylabel jylabel-red-0':1,'active':pagedata.params.pcate == child.id}">
									{{child.title}}
								</a>
								</div>
							</div>
							<div ng-if="!pagedata.category || pagedata.category.length<1" class='content-empty' style="margin-top:0">
								<i class='icon icon-cry'></i><br/>暂时没有任何分类
							</div>
							</div>
						</div>
			</div>
	</div>
	</div>
	<div class="fui-searchbar">
	    <div class="searchbar center" style="padding-top:0">
		<div class="search-input">
			<i id="searchsub" class="fa fa-search" ng-click="tool.get_list('jy_merch/myshop/list/',true)"></i>
		    <input type="search" ng-model="pagedata.params.keyword" class="search" placeholder="输入关键字...">
		</div>
	    </div>
	</div>
	 <div class="fixed-title">
							 <span class="befirst spacing">
								 <span class="icon icon-icon-xiexiantiao" style="color:#efadb0"></span>
								 <span class="icon icon-icon-xiexiantiao" style="color:#e26d71"></span>
								 <span class="icon icon-icon-xiexiantiao" style="color:#d62f35"></span>
							 </span> 
							 <span class="title-text">小店商品</span> 
							 <span class="spacing">
								 <span class="icon icon-icon-xiexiantiao" style="color:#d62f35"></span>
								 <span class="icon icon-icon-xiexiantiao" style="color:#e26d71"></span>
								 <span class="icon icon-icon-xiexiantiao" style="color:#efadb0"></span>
							 </span>
	</div>
	<div class="fui-goods-group block" id='container' style="padding: 0.2rem 0.5rem;">
	<div ng-repeat="g in pagedata.list" id="goodslist" ng-class="{'fui-goods-item':1,'disabled':g.total<=0}">
					<div  ng-click="access_json('jy_merch/goods.detail//frommyshop='+pagedata.myshop.id+'&id='+g.id)" class="image" style="background-image:url('{{tomedia(g.image) || '../core/resource/images/nopic.jpg'}}')">
							<div ng-if="g.total<=0" class="salez" style="background-image: url('{{tomedia(pagedata.shopset.saleout) || '../addons/jy_weishop/resource/images/salez.png'}}'); "></div>
					</div>
					<div class="detail" href="javascript:" ng-click="pagedata.gotopicker(g);">
						<div class="name">{{g.title}}</div>
						<div class="price">
							<span class="text">￥{{g.price}}</span>
							<span class="syscolorred"><i class="icon icon-tianmaochaoshigouwuche"></i></span>
						</div>
						<div ng-if="pagedata.params.type==0" style="margin-top:-0.35rem">
							<span class="subtitle" style="font-weight:400;font-size:0.6rem">已售{{g.salenum || 0}}{{g.unit || '件'}}</span>
						</div>
					</div>
	</div>
	</div>
	<div ng-if="loading" class='infinite-loading' style="text-align: center; color: #666;">
		<span class='fui-preloader'></span>
		<span class='text'> 正在加载...</span>
	</div>
	
	<div ng-include="sys_html('_copyright')"></div>
    </div>
	<div id='cover' ng-if="showcover ==1">
			<div class='fui-mask-m visible'></div>
			<div class='arrow'></div>
			<div class='content'>请点击右上角<br/>通过【收藏】<br/>方便下次浏览</div>
	</div>
	<div ng-if="pagedata.list.length<1" style="text-align: center; color: #666;">
		<span class="text"> 暂无商品</span>
	</div>
</div>
<div ng-include="sys_html('_shopfooter')"></div>
<div ng-include="sys_html('goods/_subpicker','','','jy_weishop')"></div>
<div ng-if="pagedata.bigwheelgames.id>0" class="fe-floatright-bottom" style="bottom:6rem">
	<div class="icon" href="javascript:;" ng-click="access_json('jy_bigwheel/game//merchid='+pagedata.myshop.id+'&id='+pagedata.pagedata.bigwheelgames.id)">
		<img style="width:2rem;height:2rem;border-radius:100%" src="../addons/jy_bigwheel/resource/images/panicon.png">
	</div>
</div>
<div id="attention" ng-if="pagedata.showqrcode==1">
	<div class="attention-alert" style="width:80%;left:10%">
					<div class="attention-content" style="padding: 1.5rem 0;background:none;height:auto">
						<div class="col-jy-1" style="text-align: center;">
							<img ng-src="{{tomedia(pagedata.kefuqr) || '../core/resource/images/nopic.jpg'}}" alt=""style="width: 100%">
						</div>
						<p >长按识别图中二维码</p>
					</div>
					<i class="icon icon-cuowu" ng-click="pagedata.showqrcode=0" style="font-size:1.5rem;color:#fff;position: absolute;top:105%;left:45%"></i>
	</div>
</div>
<script>
scope.pagedata.getlist=function(type){
	scope.pagedata.isgolist = false;
	if(scope.pagedata.params.type==type && scope.pagedata.showgroup){
		scope.pagedata.showgroup=false
	}else{
		scope.pagedata.showgroup=true
	}
	scope.pagedata.params.type=type;
	if(type!=3){
		scope.pagedata.params.page=1;
		scope.pagedata.params.order=type;
		scope.tool.get_list('jy_merch/myshop/list/',true)
	}
}
scope.pagedata.getlist(0);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_merch/myshop/list/');
}
</script>
<script type="text/javascript">
scope.pagedata.tokefu=function(){
	if(scope.pagedata.kefuset.h5appkf==1 && window.config.fromh5wxapp==1 && window.config.container!='ttapp' && window.config.container!='baiduapp'){
		//H5小程序环境下
		var logo=scope.tomedia(scope.pagedata.account.logo);
		var title=scope.pagedata.account.title
		wx.miniProgram.navigateTo({
			url: '/pages/kefu/index?logo='+logo+'&title='+title
		})
	}else{
		if(!scope.pagedata.kefuset.kefutype_h5 || scope.pagedata.kefuset.kefutype_h5==0){
			scope.access_json(scope.pagedata.kefuset.kflink);
		}else if(scope.pagedata.kefuset.kefutype_h5==1){
			scope.pagedata.kefuqr=scope.pagedata.kefuset.kf_accountimg;
			scope.pagedata.showqrcode=1;
		}else if(scope.pagedata.kefuset.kefutype_h5==2){
			scope.access_json(scope.pagedata.kefuset.appkflink)
		}else if(scope.pagedata.kefuset.kefutype_h5==3){
			scope.access_json(scope.pagedata.kefuset.workerh5url)
		}else if(scope.pagedata.kefuset.kefutype_h5==4){
			scope.pagedata.kefuqr=scope.pagedata.kefuset.guwenkfewm;
			scope.pagedata.showqrcode=1
		}else if(scope.pagedata.kefuset.kefutype_h5==5){
			window.location.href = "tel:" +scope.pagedata.kefuset.phone;
		}
		scope.$evalAsync();
	}
};
</script>